package Lab06.Extra3;

public class RectangleFactory implements IShapeFactory {
    private static final RectangleFactory factory = new RectangleFactory();
    public static RectangleFactory getFactory(){
        return factory;
    }
    public Shape makeShape(double a, double b) {
        if (a <= 0 || b <= 0) {
            return null;
        }
        return new Rectangle(a, b);
    }
}
